<?php
/// O'My Friends: Personal Social Network Graph on Facebook
///
///             author : Minkyu Shim (minkyu.shim@gmail.com)
define("SERVICE_TITLE", "O My Friends");

define("APP_DIR", "/omf");

//FACEBOOK Configuration
if($_SERVER['HTTP_HOST'] == "localhost"){
    //Dev server
    define("FB_APP_ID","209578142451059");
    define("FB_APP_SECRET","46a5370dca1443248f488e7268ed8885");
} else {
    //Live server
    define("FB_APP_ID","153950467978204");
    define("FB_APP_SECRET","82fd17a5972c84a402f05b59591c2579");    
}

define("FB_JAVASCRIPT_SDK_URL", "connect.facebook.net/en_US/all.js");
define('QUERY_SINCE', strtotime("-12 month"));

//Max Length for friendship history
define('STRING_LENGTH', 300);

//DATA TYPE FLAGS
define("ONEWAY_MESSAGE_FLAG", pow(2,0)); //1
define("TWOWAY_MESSAGE_FLAG", pow(2,1)); //2

define("MY_POST_FLAG", pow(2,2)); //4
define("FRIEND_POST_FLAG", pow(2,3)); //8

define("MY_COMMENT_ON_STATUS_FLAG", pow(2,4)); //16
define("MY_COMMENT_ON_LINK_FLAG", pow(2,5)); //32!!!
define("MY_COMMENT_ON_NOTE_FLAG", pow(2,6)); //64!!!
define("MY_COMMENT_ON_PHOTO_FLAG", pow(2,7)); //128!!!

define("FRIEND_COMMENT_ON_STATUS_FLAG", pow(2,8)); //256
define("FRIEND_COMMENT_ON_LINK_FLAG", pow(2,9)); //512
define("FRIEND_COMMENT_ON_NOTE_FLAG", pow(2,10)); //1024
define("FRIEND_COMMENT_ON_PHOTO_FLAG", pow(2,11)); //2048

define("MY_LIKE_ON_STATUS_FLAG", pow(2,12)); //4096
define("MY_LIKE_ON_LINK_FLAG", pow(2,13)); //8192!!!
define("MY_LIKE_ON_NOTE_FLAG", pow(2,14)); //16384
define("MY_LIKE_ON_PHOTO_FLAG", pow(2,15)); //32768

define("FRIEND_LIKE_ON_STATUS_FLAG", pow(2,16)); //65536
define("FRIEND_LIKE_ON_LINK_FLAG", pow(2,17)); //131072
define("FRIEND_LIKE_ON_NOTE_FLAG", pow(2,18)); //262144
define("FRIEND_LIKE_ON_PHOTO_FLAG", pow(2,19)); //524288

$data_type_flags = array(
    "ONEWAY_MESSAGE_FLAG" => ONEWAY_MESSAGE_FLAG,
	"TWOWAY_MESSAGE_FLAG" => TWOWAY_MESSAGE_FLAG,
    
    "MY_POST_FLAG" => MY_POST_FLAG,
    
    "FRIEND_POST_FLAG" => FRIEND_POST_FLAG,
    
    "MY_COMMENT_ON_STATUS_FLAG" => MY_COMMENT_ON_STATUS_FLAG,
    "MY_COMMENT_ON_LINK_FLAG"   => MY_COMMENT_ON_LINK_FLAG,
    "MY_COMMENT_ON_NOTE_FLAG"   => MY_COMMENT_ON_NOTE_FLAG,
    "MY_COMMENT_ON_PHOTO_FLAG"  => MY_COMMENT_ON_PHOTO_FLAG,
    
    "FRIEND_COMMENT_ON_STATUS_FLAG" => FRIEND_COMMENT_ON_STATUS_FLAG,
    "FRIEND_COMMENT_ON_LINK_FLAG"   => FRIEND_COMMENT_ON_LINK_FLAG,
    "FRIEND_COMMENT_ON_NOTE_FLAG"   => FRIEND_COMMENT_ON_NOTE_FLAG,
    "FRIEND_COMMENT_ON_PHOTO_FLAG"  => FRIEND_COMMENT_ON_PHOTO_FLAG,
    
    "MY_LIKE_ON_STATUS_FLAG" => MY_LIKE_ON_STATUS_FLAG,
    "MY_LIKE_ON_LINK_FLAG"   => MY_LIKE_ON_LINK_FLAG,
    "MY_LIKE_ON_NOTE_FLAG"   => MY_LIKE_ON_NOTE_FLAG,
    "MY_LIKE_ON_PHOTO_FLAG"  => MY_LIKE_ON_PHOTO_FLAG,
    
    "FRIEND_LIKE_ON_STATUS_FLAG" => FRIEND_LIKE_ON_STATUS_FLAG,
    "FRIEND_LIKE_ON_LINK_FLAG"   => FRIEND_LIKE_ON_LINK_FLAG,
    "FRIEND_LIKE_ON_NOTE_FLAG"   => FRIEND_LIKE_ON_NOTE_FLAG,
    "FRIEND_LIKE_ON_PHOTO_FLAG"  => FRIEND_LIKE_ON_PHOTO_FLAG
);

//MySQL configuration
//$dbms = 'mysqli';
//$dbhost = "localhost";
//$dbuser = "root";
//$dbpasswd = "";
//$dbname = "amigo";
//$dbport = null;


